<template>
    <div>
         <div class="hader_top_right_div4"><span class="el-icon-rank" @click="fullScreen"></span></div>
    </div>
</template>

<script>
    export default {
        data(){
            return{

            }
        },
        methods:{
             fullScreen(){
              let element = document.documentElement;
              if (this.fullscreen) {
                this.$message.success("退出全屏模式");
                this.fullscreenTitle = "进入全屏模式";
                if (document.exitFullscreen) {
                    document.exitFullscreen();
                } else if (document.webkitCancelFullScreen) {
                    document.webkitCancelFullScreen();
                } else if (document.mozCancelFullScreen) {
                    document.mozCancelFullScreen();
                } else if (document.msExitFullscreen) {
                    document.msExitFullscreen();
                }
              } else {
                this.$message.success("进入全屏模式");
                this.fullscreenTitle = "退出全屏模式";
                if(element.requestFullscreen) {
                    element.requestFullscreen();
                } else if (element.webkitRequestFullScreen) {
                    element.webkitRequestFullScreen();
                } else if (element.mozRequestFullScreen) {
                    element.mozRequestFullScreen();
                } else if (element.msRequestFullscreen) {
                    // IE11
                    element.msRequestFullscreen();
                }
              }
              this.fullscreen = !this.fullscreen;
              }
        }
    }
</script>

<style  scoped>
.hader_top_right_div4
{
    font-size:30px;
    
}
</style>